//
//  MyAttendanceVC.m
//  SchoolTask
//
//  Created by feel on 16/8/25.
//  Copyright © 2016年 sm. All rights reserved.
//

#import "MyAttendanceVC.h"
#import "MyAttendance.h"
#import "MyAttendanceCell.h"
#import "ClassAttendanceVC.h"

@interface MyAttendanceVC ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic,retain) UITableView *tableView;

@end

@implementation MyAttendanceVC

- (void)viewDidLoad {
    
    CGRect rect = [UIScreen mainScreen].bounds;
    _tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 200, rect.size.width, 500)];
    _tableView.delegate   = self;
    _tableView.dataSource = self;
    [_tableView registerNib:[UINib nibWithNibName:@"MyAttendaceCell" bundle:nil] forCellReuseIdentifier:@"cell"];
    
    MyAttendance *select  = [[MyAttendance alloc]init];
    [self.view addSubview:select];
    [self.view addSubview:_tableView];

}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    MyAttendanceCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    [cell setCellLabel];
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    return 100;
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    ClassAttendanceVC *vc = [[ClassAttendanceVC alloc]init];
    [self.navigationController pushViewController:vc animated:NO];
}

@end
